<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>hexo搭建博客 | 鸿基-梦</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
    <meta name="keywords" content="HJM100,HJM100's Blog" />
  
  <meta name="description" content="手把手教你 hexo + github搭建自己的博客以及个人主页 网上有很多这样的资料素材，但是没有一个系统化的教程 使你除了搜怎么搭建个人主页外，还要搜hexo使用教程 况且中间还可能遇到多种多样的坑 本篇文章，告诉你怎么使用github提供的空间，以及搭建自己的博客 本人亲身检测，绿色无公害； 一、环境准备 1.安装Git 下载地址：https://git-scm.com/downloads">
<meta name="keywords" content="web开发技术">
<meta property="og:type" content="article">
<meta property="og:title" content="hexo搭建博客">
<meta property="og:url" content="//hjm100.cn/Blogs/2017/09/29/hexo搭建博客/index.html">
<meta property="og:site_name" content="鸿基-梦">
<meta property="og:description" content="手把手教你 hexo + github搭建自己的博客以及个人主页 网上有很多这样的资料素材，但是没有一个系统化的教程 使你除了搜怎么搭建个人主页外，还要搜hexo使用教程 况且中间还可能遇到多种多样的坑 本篇文章，告诉你怎么使用github提供的空间，以及搭建自己的博客 本人亲身检测，绿色无公害； 一、环境准备 1.安装Git 下载地址：https://git-scm.com/downloads">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2017-10-12T08:04:07.231Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="hexo搭建博客">
<meta name="twitter:description" content="手把手教你 hexo + github搭建自己的博客以及个人主页 网上有很多这样的资料素材，但是没有一个系统化的教程 使你除了搜怎么搭建个人主页外，还要搜hexo使用教程 况且中间还可能遇到多种多样的坑 本篇文章，告诉你怎么使用github提供的空间，以及搭建自己的博客 本人亲身检测，绿色无公害； 一、环境准备 1.安装Git 下载地址：https://git-scm.com/downloads">
  
  
    <link rel="icon" href="favicon.ico">
  
  <link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/Blogs/css/style.css">
  <script src="/Blogs/js/pace.min.js"></script>
  

  
  

</head>

<body>
  <div id="container">
      <header id="header">
    <div id="banner"></div>
    <div id="header-outer">
        <div id="header-menu" class="header-menu-pos animated">
            <div class="header-menu-container">
                <a href="/Blogs/" class="left">
                    <span class="site-title">HJM100&#39;s Blog</span>
                </a>
                <nav id="header-menu-nav" class="right">
                    
                    <a  href="/Blogs/">
                        <i class="fa fa-home"></i>
                        <span>Home</span>
                    </a>
                    
                    <a  href="https://gitee.com/hjm100">
                        <i class="fa fa-archive"></i>
                        <span>Gitee</span>
                    </a>
                    
                    <a  href="https://hjm100.cn/about/">
                        <i class="fa fa-user"></i>
                        <span>About</span>
                    </a>
                    
                    <a target="_blank" href="//github.com/hjm100">
                        <i class="fa fa-github"></i>
                        <span>Github</span>
                    </a>
                    
                </nav>
                <a class="mobile-header-menu-button">
                    <i class="fa fa-bars"></i>
                </a>
            </div>
        </div>
        <div id="header-row">
            <div id="logo">
                <a href="/Blogs/">
                    <img src="/Blogs/images/logo.jpg" alt="logo">
                </a>
            </div>
            <div class="header-info">
                <div id="header-title">
                    
                    <h2>
                        HJM100&#39;s Blog
                    </h2>
                    
                </div>
                <div id="header-description">
                    
                    <h3>
                        一个专注 WEB 开发的技术博客
                    </h3>
                    
                </div>
            </div>
            <nav class="header-nav">
                <div class="social">
                    
                        <a title="Cloud yards" target="_blank" href="//gitee.com/hjm100">
                            <i class="fa fa-home fa-2x"></i></a>
                    
                        <a title="qq" target="_blank" href="//1254158627qq.com">
                            <i class="fa fa-qq fa-2x"></i></a>
                    
                        <a title="Github" target="_blank" href="//github.com/hjm100">
                            <i class="fa fa-github fa-2x"></i></a>
                    
                        <a title="Weibo" target="_blank" href="//weibo.com/u/5999637305">
                            <i class="fa fa-weibo fa-2x"></i></a>
                    
                </div>
            </nav>
        </div>
    </div>
</header>
      <div class="outer">
        <section id="main" class="body-wrap"><article id="github-hexo搭建博客" class="article article-type-github" itemscope itemprop="blogPost">
  <div class="article-inner">
    
      <header class="article-header">
        
  
    <h1 class="post-title" itemprop="name">
      hexo搭建博客
    </h1>
    <div class="post-title-bar">
      <ul>
          
              <li>
                  <i class="fa fa-book"></i>
                  
                      <a href="/Blogs/categories/web/">web</a>
                  
              </li>
          
        <li>
          <i class="fa fa-calendar"></i>  2017-09-29
        </li>
        <li>
          <i class="fa fa-eye"></i>
          <span id="busuanzi_value_page_pv"></span>
        </li>
      </ul>
    </div>
  

          
      </header>
    
    <div class="article-entry post-content" itemprop="articleBody">
      
            
            <p>手把手教你 hexo + github搭建自己的博客以及个人主页</p>
<p>网上有很多这样的资料素材，但是没有一个系统化的教程</p>
<p>使你除了搜怎么搭建个人主页外，还要搜hexo使用教程</p>
<p>况且中间还可能遇到多种多样的坑</p>
<p>本篇文章，告诉你怎么使用github提供的空间，以及搭建自己的博客</p>
<p>本人亲身检测，绿色无公害；</p>
<p>一、环境准备</p>
<p>1.安装Git 下载地址：<a href="https://git-scm.com/downloads" target="_blank" rel="external">https://git-scm.com/downloads</a></p>
<p>2.安装Node.js  下载地址：<a href="https://nodejs.org/en/" target="_blank" rel="external">https://nodejs.org/en/</a></p>
<p>3.安装hexo </p>
<p>利用 npm 命令即可安装。（在任意位置点击鼠标右键，选择Git bash）</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">npm install -g hexo</div></pre></td></tr></table></figure>
<p>hexo安装中问题：</p>
<p>npm ERR! registry error parsing json 错误</p>
<p>可能需要设置npm代理,执行命令</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">npm config <span class="built_in">set</span> registry http://registry.cnpmjs.org</div></pre></td></tr></table></figure>
<p>hexo:command not found</p>
<p>删除刚刚安装的npm目录，重新执行命令npm install -g hexo安装hexo， -g为全局安装</p>
<p>二、初始化hexo项目</p>
<p>1.创建hexo文件夹</p>
<p>安装完成后，在你喜爱的文件夹下（如H:\hexo），</p>
<p>执行以下指令(在H:\hexo内点击鼠标右键，选择Git bash)，</p>
<p>Hexo 即会自动在目标文件夹建立网站所需要的所有文件。</p>
<p>hexo init（初始化hexo项目）</p>
<p>2.安装依赖包</p>
<p>npm install（安装npm依赖包）</p>
<p>现在我们已经搭建起本地的hexo博客了</p>
<p>hexo命令行使用</p>
<p>常用命令：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div></pre></td><td class="code"><pre><div class="line">hexo <span class="built_in">help</span>                <span class="comment">#查看帮助</span></div><div class="line">hexo init                <span class="comment">#初始化一个目录</span></div><div class="line">hexo new <span class="string">"postName"</span>      <span class="comment">#新建文章</span></div><div class="line">hexo new page <span class="string">"pageName"</span> <span class="comment">#新建页面</span></div><div class="line">hexo generate            <span class="comment">#生成网页，可以在 public 目录查看整个网站的文件</span></div><div class="line">hexo server              <span class="comment">#本地预览，'Ctrl+C'关闭</span></div><div class="line">hexo deploy              <span class="comment">#部署.deploy目录</span></div><div class="line">hexo clean               <span class="comment">#清除缓存，**强烈建议每次执行命令前先清理缓存，每次部署前先删除 .deploy 文件夹**</span></div><div class="line"></div><div class="line">简写（常用）：</div><div class="line">hexo n == hexo new</div><div class="line">hexo g == hexo generate</div><div class="line">hexo s == hexo server</div><div class="line">hexo d == hexo deploy</div><div class="line">``` </div><div class="line">3.本地预览</div><div class="line"></div><div class="line">执行一下命令：</div><div class="line"></div><div class="line">hexo generate 生成网页</div><div class="line"></div><div class="line">hexo server   本地预览</div><div class="line"></div><div class="line">到浏览器输入localhost:4000可以看到（系统再带的博客页面）。</div><div class="line"></div><div class="line">三、更换模板</div><div class="line"></div><div class="line">可能系统自带的模板不满足你的需求，没关系hexo提供了很多模板供你选择</div><div class="line"></div><div class="line">访问：https://hexo.io/themes/选择自己喜欢的模板吧！</div><div class="line"></div><div class="line">本人选择的模板是MiHo 主题地址 http://blog.minhow.com/2017/08/01/blog/installation-configuration/</div><div class="line"></div><div class="line">1、搭建自己喜欢的模板</div><div class="line"></div><div class="line">1.1 安装主题</div><div class="line"></div><div class="line">删除hexo自带的themes文件夹在hexo下<span class="built_in">clone</span> MiHo 主题</div><div class="line">``` bash</div><div class="line">$ git <span class="built_in">clone</span> https://github.com/WongMinHo/hexo-theme-miho.git themes/miho</div><div class="line">``` </div><div class="line">MiHo 主题需要Hexo 3.0或以上版本，请先升级。</div><div class="line"></div><div class="line">1.2 更新主题（提供技术支持）</div><div class="line">``` bash</div><div class="line"><span class="built_in">cd</span> themes/miho</div></pre></td></tr></table></figure>
<p>git pull</p>
<p>1.3 依赖安装</p>
<p>生成站点文章静态数据，用于站内搜索。<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div><div class="line">72</div><div class="line">73</div><div class="line">74</div><div class="line">75</div><div class="line">76</div><div class="line">77</div><div class="line">78</div><div class="line">79</div><div class="line">80</div><div class="line">81</div><div class="line">82</div><div class="line">83</div><div class="line">84</div><div class="line">85</div><div class="line">86</div></pre></td><td class="code"><pre><div class="line">npm install hexo-generator-json-content --save</div><div class="line">``` </div><div class="line">1.4 配置主题</div><div class="line"></div><div class="line">此处需要理解：</div><div class="line"></div><div class="line">与themes文件同级的_config.yml文件是hexo的项目配置文件（以下定义为‘主配置’）</div><div class="line"></div><div class="line">在themes/miho文件中的_config.yml文件是主题的配置文件（以下定义为‘主题配置’）</div><div class="line"></div><div class="line">注：可以在_config.yml中定义变量在模板中&lt;%- config.userurl %&gt;引入</div><div class="line"></div><div class="line">在主配置下找到theme属性将其定义为theme: miho即可</div><div class="line"></div><div class="line">主配置文件属性注释：</div><div class="line">``` bash</div><div class="line"><span class="comment"># Hexo Configuration</span></div><div class="line"><span class="comment">## Docs: http://hexo.io/docs/configuration.html</span></div><div class="line"><span class="comment">## Source: https://github.com/hexojs/hexo/</span></div><div class="line"><span class="comment"># Site #站点信息</span></div><div class="line">title:  <span class="comment">#标题</span></div><div class="line">subtitle:  <span class="comment">#副标题</span></div><div class="line">description:  <span class="comment">#站点描述，给搜索引擎看的</span></div><div class="line">author:  <span class="comment">#作者</span></div><div class="line">email:  <span class="comment">#电子邮箱</span></div><div class="line">language: zh-CN <span class="comment">#语言</span></div><div class="line"><span class="comment"># URL #链接格式</span></div><div class="line">url:  <span class="comment">#网址</span></div><div class="line">root: / <span class="comment">#根目录</span></div><div class="line">permalink: :year/:month/:day/:title/ <span class="comment">#文章的链接格式</span></div><div class="line">tag_dir: tags <span class="comment">#标签目录</span></div><div class="line">archive_dir: archives <span class="comment">#存档目录</span></div><div class="line">category_dir: categories <span class="comment">#分类目录</span></div><div class="line">code_dir: downloads/code</div><div class="line">permalink_defaults:</div><div class="line"><span class="comment"># Directory #目录</span></div><div class="line">source_dir: <span class="built_in">source</span> <span class="comment">#源文件目录</span></div><div class="line">public_dir: public <span class="comment">#生成的网页文件目录</span></div><div class="line"><span class="comment"># Writing #写作</span></div><div class="line">new_post_name: :title.md <span class="comment">#新文章标题</span></div><div class="line">default_layout: post <span class="comment">#默认的模板，包括 post、page、photo、draft（文章、页面、照片、草稿）</span></div><div class="line">titlecase: <span class="literal">false</span> <span class="comment">#标题转换成大写</span></div><div class="line">external_link: <span class="literal">true</span> <span class="comment">#在新选项卡中打开连接</span></div><div class="line">filename_case: 0</div><div class="line">render_drafts: <span class="literal">false</span></div><div class="line">post_asset_folder: <span class="literal">false</span></div><div class="line">relative_link: <span class="literal">false</span></div><div class="line">highlight: <span class="comment">#语法高亮</span></div><div class="line">  <span class="built_in">enable</span>: <span class="literal">true</span> <span class="comment">#是否启用</span></div><div class="line">  line_number: <span class="literal">true</span> <span class="comment">#显示行号</span></div><div class="line">  tab_replace:</div><div class="line"><span class="comment"># Category &amp; Tag #分类和标签</span></div><div class="line">default_category: uncategorized <span class="comment">#默认分类</span></div><div class="line">category_map:</div><div class="line">tag_map:</div><div class="line"><span class="comment"># Archives</span></div><div class="line">2: 开启分页</div><div class="line">1: 禁用分页</div><div class="line">0: 全部禁用</div><div class="line">archive: 2</div><div class="line">category: 2</div><div class="line">tag: 2</div><div class="line"><span class="comment"># Server #本地服务器</span></div><div class="line">port: 4000 <span class="comment">#端口号</span></div><div class="line">server_ip: localhost <span class="comment">#IP 地址</span></div><div class="line">logger: <span class="literal">false</span></div><div class="line">logger_format: dev</div><div class="line"><span class="comment"># Date / Time format #日期时间格式</span></div><div class="line">date_format: YYYY-MM-DD <span class="comment">#参考http://momentjs.com/docs/#/displaying/format/</span></div><div class="line">time_format: H:mm:ss</div><div class="line"><span class="comment"># Pagination #分页</span></div><div class="line">per_page: 10 <span class="comment">#每页文章数，设置成 0 禁用分页</span></div><div class="line">pagination_dir: page</div><div class="line"><span class="comment"># Disqus #Disqus评论，替换为多说</span></div><div class="line">disqus_shortname:</div><div class="line"><span class="comment"># Extensions #拓展插件</span></div><div class="line">theme: landscape-plus <span class="comment">#主题</span></div><div class="line">exclude_generator:</div><div class="line">plugins: <span class="comment">#插件，例如生成 RSS 和站点地图的</span></div><div class="line">- hexo-generator-feed</div><div class="line">- hexo-generator-sitemap</div><div class="line"><span class="comment"># Deployment #部署，将 lmintlcx 改成用户名</span></div><div class="line">deploy:</div><div class="line">  <span class="built_in">type</span>: git</div><div class="line">  repo: github创库地址.git （需要使用ssh）</div><div class="line">  branch: master</div></pre></td></tr></table></figure></p>
<p>不要担心主题配置文件有中文注释，根据提示走就可以轻松搞定</p>
<p>注意：主配置文件中的 url ，root配置<br>url: <a href="https://hjm100.github.io/Blogs" target="_blank" rel="external">https://hjm100.github.io/Blogs</a><br>root: /Blogs</p>
<p>如果你想要通过<a href="https://hjm100.github.io去访问你的博客root" target="_blank" rel="external">https://hjm100.github.io去访问你的博客root</a>: /<br>因为我的<a href="https://hjm100.github.io用来装自己的主页，所以我的博客地址架构如上" target="_blank" rel="external">https://hjm100.github.io用来装自己的主页，所以我的博客地址架构如上</a></p>
<p>虽然选择了自己想要的主题，但是主题中显示有关主体信息，以及博客信息，看着就不舒服</p>
<p>特别是网页底部版权那块，教你怎么改：</p>
<p>修改模板标签(用于一般模板不满足个人需求)<br>步骤：<br>用文本编辑器打开 Hexo 所在的目录<br>打开 themes 目录<br>打开你想要编辑的主题所在的目录中的 layout 目录<br>打开 layout 目录下的 _partial 目录<br>打开 _partial 目录下的 footer.ejs 文件修改底部链接<br>post/copyright.ejs用于修改文章页脚用户链接</p>
<p>好了，至此，本地博客已经搭建起来了，只是本地哦，别人看不到的。下面，我们要部署到Github。</p>
<p>四、外网部署（为的就是省钱–哈哈）：</p>
<p>github为我们提供了一个放置静态资源的空间，空间不大但是足以满足你博客以及个人主页的部署</p>
<p>如果有后台就不行了（不过可以选择自己租服务器，一个月就50多，不差钱的同鞋可以考虑一下）</p>
<p>以我的为例：github放置个人主页以及博客</p>
<p>1.申请账号，设置公钥这些老生常谈的话题就不用多说了（直接进入主题）</p>
<p>2.创建代码仓库<br>2.1 点击加号穿件仓库New repository<br>2.2仓库名字格式必须为: yourname.github.io （yourname为你的账号名）<br>2.3进入新建的项目点击Settings设置项目找到GitHub Pages 点击change theme选择模板<br>这时你的项目中就有了生成文件（但是这是系统创建的）<br>2.4 不要删除_config.yml文件直接引入你的个人主页项目即可，默认打开index.html</p>
<p>ok此时你的个人主页已经搭建好了</p>
<p>Blogs的搭建，你可以新建一个代码仓库（把这个代码仓库设置为html）</p>
<p>在设置中的GitHub Pages 选择Source 中的下拉框为master branch做法与上一样！</p>
<p>3.仓库分析（yourname.github.io放个人主页，Blogs存放博客）</p>
<p>4.Blogs上传：<br>将主配置中的deploy属性添加一下代码，<br>deploy:<br>  type: git<br>  repo: 你github上的Blogs的SSH地址（注意ssh必须是系统最先生成的）<br>  branch: master</p>
<p>运行命令行<br> hexo g 编译文件<br> hexo d 提交文件即可</p>
<p> 4.发布博文<br> 在hexo\source_posts文件夹下新建一个MD文件类型的文档<br> 或者命令行 hexo new 博文创建<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div></pre></td><td class="code"><pre><div class="line">---</div><div class="line">title: 博文  （博文标题）</div><div class="line">date: 2017-09-27 14:49:15 （博文时间）</div><div class="line">categories: hexo <span class="comment">#文章文类</span></div><div class="line">tags: web开发技术  （ 文章标签）</div><div class="line">cover_picture: images/exploit.jpg(图片格式)</div><div class="line">---</div><div class="line">这里正常写文章即可</div><div class="line"><span class="comment"># 可以理解为h1(但是#后面一定要有空格)</span></div><div class="line">``` bash（代码要写在这里面）</div><div class="line">$ console.log(<span class="string">'Hello hjm100'</span>) //这里写代码</div></pre></td></tr></table></figure></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">注意：博文写好之后一定要先在本地查看后在提交！！！！！！</div><div class="line">  ```bash</div><div class="line">  语法：&#123;&#123;express | 过滤器名:补充说明&#125;&#125;（一定要放在bash中）</div></pre></td></tr></table></figure>
<p>五、域名的配置（将github提供的二级域名与自己购买的域名绑定）：</p>
<p>1.可以前往腾讯购买一个域名，一般cn域名一年就20多块钱</p>
<p>2.点击 Github 上项目的 Settings，GitHub Pages，</p>
<p>提示Your site is published at <a href="http://hjm100.cn" target="_blank" rel="external">http://hjm100.cn</a> (这是我买的域名)</p>
<p>Custom domain下面的对话框填写你的域名即可</p>
<p>将独立域名与GitHub Pages的空间绑定</p>
<p>方法一：在站点source目录下面，新建一个名为CNAME的文本文件，</p>
<pre><code>里面写入你要绑定的域名，比如hjm100.cn
</code></pre><p>方法二：在Repository的根目录下面，新建一个名为CNAME的文本文件，</p>
<pre><code>里面写入你要绑定的域名，比如hjm100.cn
</code></pre><p>在github上面添加好自己的域名后，不要着急，此时你的域名还没有与博客完全绑定</p>
<p>打开cmd命令行，使用ping hjm100.github.io 查看到git对应的ip地址</p>
<p>前往你购买域名的平台进行ipv4域名解析，输入你ping到的域名即可，</p>
<p>域名解析后，去浏览器访问一下你的域名吧！就是这么神奇！！</p>
<p>至此你的博客已经搭建完毕了，不要感谢我，本人博客预览hjm100.cn </p>
<p>域名https添加（让你的域名更加安全）</p>
<p>第一步首先注册一个属于自己的域名，可以选择cn域名，不贵一年就20多元<br>我的域名是hjm100.cn</p>
<p>第二步域名https添加，</p>
<p>1.登录这个网站并注册：<a href="https://www.cloudflare.com/（直接使用邮箱注册）" target="_blank" rel="external">https://www.cloudflare.com/（直接使用邮箱注册）</a></p>
<p>2.注册完毕后登录，如果你之前没有用过，则系统会直接显示<br>Add a website对话框，再次填写hjm100.cn(你的域名)点击scan DNS Records即可，<br>系统会自动扫描你的域名（扫描需要等待一定时间）</p>
<p>3.扫描完毕后点击Continue(继续)</p>
<p>4.添加DNS Records<br>typt:CNAME类型 name：www Value:</p>

            <div class="post-copyright">
    <div class="content">
        <p>最后更新： 2017年10月12日 16:04</p>
        <p>原始链接： <a class="post-url" href="/Blogs/2017/09/29/hexo搭建博客/" title="hexo搭建博客">//hjm100.cn/Blogs/2017/09/29/hexo搭建博客/</a></p>
        <footer>
            <a href="//hjm100.cn/about">
                <img src="/Blogs/images/logo.jpg" alt="hjm100">
                hjm100
            </a>
        </footer>
    </div>
</div>

      
    </div>
    <footer class="article-footer">
        
        
<div class="post-share">
    <a href="javascript:;" id="share-sub" class="post-share-fab">
        <i class="fa fa-share-alt"></i>
    </a>
    <div class="post-share-list" id="share-list">
        <ul class="share-icons">
          <li>
            <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=//hjm100.cn/Blogs/2017/09/29/hexo搭建博客/&title=《hexo搭建博客》 — 鸿基-梦&pic=//hjm100.cn/Blogsimages/logo.jpg" data-title="微博">
              <i class="fa fa-weibo"></i>
            </a>
          </li>
          <li>
            <a class="weixin share-sns" id="wxFab" href="javascript:;" data-title="微信">
              <i class="fa fa-weixin"></i>
            </a>
          </li>
          <li>
            <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=//hjm100.cn/Blogs/2017/09/29/hexo搭建博客/&title=《hexo搭建博客》 — 鸿基-梦&source=前端博客,鸿基梦,hjm100," data-title="QQ">
              <i class="fa fa-qq"></i>
            </a>
          </li>
          <li>
            <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=//hjm100.cn/Blogs/2017/09/29/hexo搭建博客/" data-title="Facebook">
              <i class="fa fa-facebook"></i>
            </a>
          </li>
          <li>
            <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《hexo搭建博客》 — 鸿基-梦&url=//hjm100.cn/Blogs/2017/09/29/hexo搭建博客/&via=//hjm100.cn/Blogs" data-title="Twitter">
              <i class="fa fa-twitter"></i>
            </a>
          </li>
          <li>
            <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=//hjm100.cn/Blogs/2017/09/29/hexo搭建博客/" data-title="Google+">
              <i class="fa fa-google-plus"></i>
            </a>
          </li>
        </ul>
     </div>
</div>
<div class="post-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;" id="wxShare-close">×</a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=//hjm100.cn/Blogs/2017/09/29/hexo搭建博客/" alt="微信分享二维码">
</div>

<div class="mask"></div>

        
        <ul class="article-footer-menu">
            
            
  <li class="article-footer-tags">
    <i class="fa fa-tags"></i>
      
    <a href="/Blogs/tags/web开发技术/" class="color3">web开发技术</a>
      
  </li>

        </ul>
        
    </footer>
  </div>
</article>



<nav id="article-nav">
  
    <a href="/Blogs/2017/10/09/工作日常习惯/" id="article-nav-newer" class="article-nav-link-wrap">

      <span class="article-nav-title">
        <i class="fa fa-hand-o-left" aria-hidden="true"></i>
        
          工作日常习惯
        
      </span>
    </a>
  
  
    <a href="/Blogs/2017/09/27/一台电脑多个公钥/" id="article-nav-older" class="article-nav-link-wrap">
      <span class="article-nav-title">一台电脑多个公钥</span>
      <i class="fa fa-hand-o-right" aria-hidden="true"></i>
    </a>
  
</nav>



    
        <section id="comments">
            <div id="disqus_thread">
                <script type="text/javascript">
                    var disqus_shortname = 'true';
                    (function() {
                        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
                        dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
                        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
                    })();
                </script>
                <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
            </div>
        </section>
    
</section>
        
      </div>
      <footer id="footer">
  <div class="outer">
    <div id="footer-info" class="inner">
      
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


      <p>&copy; 2017 hjm100
          .版权所有 | 相关设计 <a href="https://gitee.com/hjm100" target="_blank">鸿基梦</a><br>
      </p>
    </div>
  </div>
</footer>
    <script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script>
  var mihoConfig = {
      root: "//hjm100.cn/Blogs",
      animate: true,
      isHome: false,
      share: true
  }
</script>
<div class="sidebar">
    <div id="sidebar-search" title="Search">
        <i class="fa fa-search"></i>
    </div>
    <div id="sidebar-category" title="Categories">
        <i class="fa fa-book"></i>
    </div>
    <div id="sidebar-tag" title="Tags">
        <i class="fa fa-tags"></i>
    </div>
    <div id="sidebar-top">
        <span class="sidebar-top-icon"><i class="fa fa-angle-up"></i></span>
    </div>
</div>
<div class="sidebar-menu-box" id="sidebar-menu-box">
    <div class="sidebar-menu-box-container">
        <div id="sidebar-menu-box-categories">
            <a class="category-link" href="/Blogs/categories/web/">web</a><a class="category-link" href="/Blogs/categories/习惯/">习惯</a><a class="category-link" href="/Blogs/categories/学习/">学习</a><a class="category-link" href="/Blogs/categories/开发/">开发</a>
        </div>
        <div id="sidebar-menu-box-tags">
            <a href="/Blogs/tags/angular/" style="font-size: 10px;">angular</a> <a href="/Blogs/tags/web开发技术/" style="font-size: 20px;">web开发技术</a> <a href="/Blogs/tags/工作习惯/" style="font-size: 15px;">工作习惯</a> <a href="/Blogs/tags/开发技术/" style="font-size: 10px;">开发技术</a>
        </div>
    </div>
    <a href="javascript:;" class="sidebar-menu-box-close">&times;</a>
</div>
<div class="mobile-header-menu-nav" id="mobile-header-menu-nav">
    <div class="mobile-header-menu-container">
        <span class="title">Menus</span>
        <ul class="mobile-header-menu-navbar">
            
            <li>
                <a  href="/Blogs/">
                    <i class="fa fa-home"></i><span>Home</span>
                </a>
            </li>
            
            <li>
                <a  href="https://gitee.com/hjm100">
                    <i class="fa fa-archive"></i><span>Gitee</span>
                </a>
            </li>
            
            <li>
                <a  href="https://hjm100.cn/about/">
                    <i class="fa fa-user"></i><span>About</span>
                </a>
            </li>
            
            <li>
                <a target="_blank" href="//github.com/hjm100">
                    <i class="fa fa-github"></i><span>Github</span>
                </a>
            </li>
            
        </ul>
    </div>
    <div class="mobile-header-tag-container">
        <span class="title">Tags</span>
        <div id="mobile-header-container-tags">
            <a href="/Blogs/tags/angular/" style="font-size: 10px;">angular</a> <a href="/Blogs/tags/web开发技术/" style="font-size: 20px;">web开发技术</a> <a href="/Blogs/tags/工作习惯/" style="font-size: 15px;">工作习惯</a> <a href="/Blogs/tags/开发技术/" style="font-size: 10px;">开发技术</a>
        </div>
    </div>
</div>
<div class="search-wrap">
    <span class="search-close">&times;</span>
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
            <i class="icon icon-lg icon-chevron-left"></i>
        </a>
        <input class="search-field" placeholder="Search..." id="keywords">
        <a id="search-submit" href="javascript:;">
            <i class="fa fa-search"></i>
        </a>
    <div class="search-container" id="search-container">
        <ul class="search-result" id="search-result">
        </ul>
    </div>
</div>

<div id="search-tpl">
    <li class="search-result-item">
        <a href="{url}" class="search-item-li">
            <span class="search-item-li-title" title="{title}">{title}</span>
        </a>
    </li>
</div>
<script src="/Blogs/js/search.js"></script>
<script src="/Blogs/js/main.js"></script>


  <script src="//cdn.bootcss.com/particles.js/2.0.0/particles.min.js"></script>
  <div id="particles"></div>
  <script src="/Blogs/js/particles.js"></script>







  <link rel="stylesheet" href="//cdn.bootcss.com/animate.css/3.5.0/animate.min.css">
  <script src="//cdn.bootcss.com/scrollReveal.js/3.0.5/scrollreveal.js"></script>
  <script src="/Blogs/js/animate.js"></script>

  </div>
</body>
</html>